//1.获取页面元素
      //表单标签
      var form = document.getElementById("registerForm");
      //三个输入框
      var inputUser = document.getElementById("username");
      var inputPwd = document.getElementById("pwd");
      var inputPwd2 = document.getElementById("pwd2");

      form.onsubmit = function () {
       /*  if (inputUser.onblur() && inputPwd.onblur() && inputPwd2.onblur()) {
          return true;
        } else {
          return false;
        } */
       return inputUser.onblur() && inputPwd.onblur() && inputPwd2.onblur();
      };

      //确认密码框绑定事件
      inputPwd2.onblur = function () {
        if (
          inputPwd2.value == inputPwd.value &&
          /^\d{5,7}$/.test(inputPwd2.value)
        ) {
          inputPwd2.nextElementSibling.innerHTML =
            "<font color='green'>密码一致</font>";
          return true;
        } else {
          inputPwd2.nextElementSibling.innerHTML =
            "<font color='red'>密码不一致</font>";
          return false;
        }
      };

      //密码框绑定事件 校验密码 纯数字 5~7位
      inputPwd.onblur = function () {
        if (/^\d{5,7}$/.test(inputPwd.value)) {
          //给弟弟节点span 添加内容
          inputPwd.nextElementSibling.innerHTML =
            "<font color='green'>密码满足要求</font>";
          return true;
        } else {
          //给弟弟节点span 添加内容
          inputPwd.nextElementSibling.innerHTML =
            "<font color='green'>密码不满足要求</font>";
          return false;
        }
      };

      //给输入框进行事件绑定 判断 用户名是否为字母数字下划线[5,9]
      inputUser.onblur = function () {
        if (/^\w{5,9}$/.test(inputUser.value)) {
          inputUser.nextElementSibling.innerHTML =
            "<font color='green'>用户名满足要求</font>";
          return true;
        } else {
          inputUser.nextElementSibling.innerHTML =
            "<font color='red'>用户名不满足要求</font>";
          return false;
        }
      };

      /*  var result =   inputUser.onblur();
     console.log(result); */